<?php
  if(isset($_FILES['avatar']['tmp_name']))
  {
      $src = $_FILES['avatar']['tmp_name'];
      $fileName = $_FILES['avatar']['name'];
      $dest = "uploads/$fileName";
      move_uploaded_file($src,$dest);
  }
?>
<form action="" method="post"
enctype="multipart/form-data">
  Avatar : <input type="file" name="avatar"/><br>
  <input type="submit" value="Upload Data !!" />
</form>
